home *** CD-ROM | disk | FTP | other *** search
- Path: keats.ugrad.cs.ubc.ca!not-for-mail
- From: c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku)
- Newsgroups: comp.lang.perl.misc,comp.lang.c
- Subject: Re: PROGRAMERS OF ANY LANGUAGE
- Date: 14 Apr 1996 09:12:57 -0700
- Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
- Message-ID: <4kr869INN35k@keats.ugrad.cs.ubc.ca>
- References: <Pine.SOL.3.91.960329010021.13209A-100000@harvey> <316A6189.4287@wight.hursley.ibm.com> <4kg58c$djh@kalypso.cybercom.net> <4kqe6q$1tm@innocence.interface-business.de>
- NNTP-Posting-Host: keats.ugrad.cs.ubc.ca
-
- In article <4kqe6q$1tm@innocence.interface-business.de>,
- J Wunsch <joerg_wunsch@uriah.heep.sax.de> wrote:
- >stok@kalypso.cybercom.net (Michael J. Stok) writes:
- >
- >> The {}s shouldn't be optional! That's the route Perl took with blocks
- >> after for, if, while, else etc. Just because C and similar languages
- >> have the "optimisation" that they the {}s are optional doesn't mean it's
- >> right :-)
- >
- >Just because Perl allows for the "optimisation" to put the "if" before
- >or after the statement, and mandates the curlies _for one of the options_,
- >doesn't make the code better per se. :-)
-
- Perl cops out of resolving the classic ``if/then ambiguity'' by forcing the
- required syntactic units to be compound statements, doesn't it?
-
- In Perl, you write:
-
- if (....)
- if (....)
- if (....)
- statement;
- else
- statement;
-
- The programmer is forced to ``disambiguate'':
-
- if (....) {
- if (....) {
- if (....) {
- statement;
- }
- }
- } else {
- statement;
- }
-
- What a PITA. (And I ain't referring to an Italian meal also known as a pizza
- pocket, either).
-